<html>  
  <head>  
        <meta charset="utf-8">  
        <title>7.1.1.2 过渡对象</title>  
  </head> 
  <style>
  </style>
<body>

<script src="../../d3/d3.min.js" charset="utf-8"></script> 
<script>  

var width  = 500;	//SVG绘制区域的宽度
var height = 500;	//SVG绘制区域的高度
	
var svg = d3.select("body")			//选择<body>
			.append("svg")			//在<body>中添加<svg>
			.attr("width", width)	//设定<svg>的宽度属性
			.attr("height", height);//设定<svg>的高度属性

var rect = svg.append("rect")
				.attr("fill","steelblue")
				.attr("x",10)
				.attr("y",10)
				.attr("width",100)
				.attr("height",30);

console.log(rect);	//rect是选择集

var rectTran = rect.transition();
				
console.log(rectTran);	//rectTran是一个过渡对象
				
</script> 

</body>
</html>